import React, { Component } from "react";

import { DIRECTION } from "../define";
import "../style/elevatorDoor.css";

class ElevatorDoor extends Component {
  constructor(props) {
    super(props);
  }
  state = {};

  render() {
    const { currentFloor, elevDetailArr } = this.props;
    return (
      <div className="elevator-door-root">
        {elevDetailArr.length > 0 &&
        DIRECTION.NONE === elevDetailArr[0].showDirection &&
        currentFloor === elevDetailArr[0].floor ? (
          <div className="opened"></div>
        ) : (
          <div className="center-line"></div>
        )}
      </div>
    );
  }
}

export default ElevatorDoor;
